package com.aos.erp.gov.ex.mapper;

import com.aos.erp.common.dao.mapper.SuperMapper;
import com.aos.erp.gov.ex.enums.TicketStatus;
import com.aos.erp.gov.ex.model.GovSchoolTicket;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.Date;

public interface GovSchoolTicketMapper extends SuperMapper<GovSchoolTicket> {

    @Update("UPDATE t_gov_school_ticket SET cookies=#{cookies} ,status=#{status},refresh_time=#{updateTime},update_time=#{updateTime} where id=#{id}")
    void updateCookies(@Param("id") long id, @Param("cookies") String cookies, @Param("status") TicketStatus status, @Param("updateTime") Date updateTime);

    @Update("UPDATE t_gov_school_ticket SET status=#{status},refresh_time=#{refreshTime} where id=#{id}")
    void updateRefreshFlag(@Param("id") long id, @Param("refreshTime") Date refreshTime, @Param("status") TicketStatus status);

}
